Trigger on Creation of a Link

Hello all,

I am trying to make a trigger that activates on the creation of a link.  The purpose is so that I can instantly populate an attribute column with all of the links for that object. I am currently working with DOORS 9.3.

The DXL reference manual has a confusing function in it under "Trigger Manipulation" whose declaration is: Link link(Trigger t)  , and the description of the operation is: "when a trigger fires because of an operation on a link...this perm provides access to the corresponding link."

This leads me to believe that this is indeed possible despite old forums that say otherwise. Please help with any information you could provide.

Thanks,


steaksauce - Wed Aug 07 17:45:23 EDT 2013

Re: Trigger on Creation of a Link
llandale - Thu Aug 08 15:33:19 EDT 2013

Looking inside the v9306 doors.exe I see the ability to create links-create triggers, but I see running the code results in null triggers.  It appears they haven't activated it yet.

  • bool clbkTrigCreatePRE(Trigger in_trg)
  • { print ">>clbkTrigCreatePRE\n"
  •  return(true)
  • }
  • void clbkTrigCreatePOST(Trigger in_trg)
  • { print ">>clbkTrigCreatePOST\n"
  • }
  • bool clbkTrigDeletePRE(Trigger in_trg)
  • { print ">>clbkTrigDeletePRE\n"
  •  return(true)
  • }
  • void clbkTrigDeletePOST(Trigger in_trg)
  • { print ">>clbkTrigDeletePOST\n"
  • }
  • Trigger t1, t2, t3, t4
  • t1 = trigger(links, create(), 4, clbkTrigCreatePRE)  // Dynamic triggers
  • t2 = trigger(module->links->all, create(), 4, clbkTrigCreatePOST)
  • t3 = trigger(module->links, delete(), 4, clbkTrigDeletePRE)
  • t4 = trigger(module->links, delete(), 4, clbkTrigDeletePOST)
  • print "Nulls:\t" (null t1) "\t" (null t2) "\t" (null t3) "\t" (null t4) "\n"

All the nulls print "true".

-Louie

Re: Trigger on Creation of a Link
steaksauce - Thu Aug 08 17:08:27 EDT 2013

llandale - Thu Aug 08 15:33:19 EDT 2013

Looking inside the v9306 doors.exe I see the ability to create links-create triggers, but I see running the code results in null triggers.  It appears they haven't activated it yet.

  • bool clbkTrigCreatePRE(Trigger in_trg)
  • { print ">>clbkTrigCreatePRE\n"
  •  return(true)
  • }
  • void clbkTrigCreatePOST(Trigger in_trg)
  • { print ">>clbkTrigCreatePOST\n"
  • }
  • bool clbkTrigDeletePRE(Trigger in_trg)
  • { print ">>clbkTrigDeletePRE\n"
  •  return(true)
  • }
  • void clbkTrigDeletePOST(Trigger in_trg)
  • { print ">>clbkTrigDeletePOST\n"
  • }
  • Trigger t1, t2, t3, t4
  • t1 = trigger(links, create(), 4, clbkTrigCreatePRE)  // Dynamic triggers
  • t2 = trigger(module->links->all, create(), 4, clbkTrigCreatePOST)
  • t3 = trigger(module->links, delete(), 4, clbkTrigDeletePRE)
  • t4 = trigger(module->links, delete(), 4, clbkTrigDeletePOST)
  • print "Nulls:\t" (null t1) "\t" (null t2) "\t" (null t3) "\t" (null t4) "\n"

All the nulls print "true".

-Louie

Thanks Louie, I've been having the same results when creating persistent link triggers.  That's weird, I'm going to contact IBM support and see if they are in the process of releasing this feature. I'll let you know what I find.

Re: Trigger on Creation of a Link
XiaoXingLu - Mon Jan 29 23:31:30 EST 2018

llandale - Thu Aug 08 15:33:19 EDT 2013

Looking inside the v9306 doors.exe I see the ability to create links-create triggers, but I see running the code results in null triggers.  It appears they haven't activated it yet.

  • bool clbkTrigCreatePRE(Trigger in_trg)
  • { print ">>clbkTrigCreatePRE\n"
  •  return(true)
  • }
  • void clbkTrigCreatePOST(Trigger in_trg)
  • { print ">>clbkTrigCreatePOST\n"
  • }
  • bool clbkTrigDeletePRE(Trigger in_trg)
  • { print ">>clbkTrigDeletePRE\n"
  •  return(true)
  • }
  • void clbkTrigDeletePOST(Trigger in_trg)
  • { print ">>clbkTrigDeletePOST\n"
  • }
  • Trigger t1, t2, t3, t4
  • t1 = trigger(links, create(), 4, clbkTrigCreatePRE)  // Dynamic triggers
  • t2 = trigger(module->links->all, create(), 4, clbkTrigCreatePOST)
  • t3 = trigger(module->links, delete(), 4, clbkTrigDeletePRE)
  • t4 = trigger(module->links, delete(), 4, clbkTrigDeletePOST)
  • print "Nulls:\t" (null t1) "\t" (null t2) "\t" (null t3) "\t" (null t4) "\n"

All the nulls print "true".

-Louie

It does not work on 9.5.2.1 and 9.6.0.1(nulls print "true"), but works fine on 9.6.1.9 based on my testing. So it should only work since 9.6.1.9 . While we look at https://www-01.ibm.com/support/docview.wss?uid=swg24043733, we can see below, which is a new feature:

--------------------------------------------------------------

DXL triggers for links, attribute definitions, and attribute types. These functions enable you to create triggers for any create/modify/delete actions on links, attrdef, and attrtype elements. Like all triggers, these include scope options for specific modules, projects, or the whole database. A pre- and post- event modifier and priority (1-10) can be applied. Support for link triggers are for Rational DOORS internal links. Triggers on external links are not supported. For more information on DXL triggers, see the DXL Reference Manual chapter 29 in the Knowledge Center.

--------------------------------------------------------------

Re: Trigger on Creation of a Link
XiaoXingLu - Thu Feb 01 18:38:28 EST 2018

XiaoXingLu - Mon Jan 29 23:31:30 EST 2018

It does not work on 9.5.2.1 and 9.6.0.1(nulls print "true"), but works fine on 9.6.1.9 based on my testing. So it should only work since 9.6.1.9 . While we look at https://www-01.ibm.com/support/docview.wss?uid=swg24043733, we can see below, which is a new feature:

--------------------------------------------------------------

DXL triggers for links, attribute definitions, and attribute types. These functions enable you to create triggers for any create/modify/delete actions on links, attrdef, and attrtype elements. Like all triggers, these include scope options for specific modules, projects, or the whole database. A pre- and post- event modifier and priority (1-10) can be applied. Support for link triggers are for Rational DOORS internal links. Triggers on external links are not supported. For more information on DXL triggers, see the DXL Reference Manual chapter 29 in the Knowledge Center.

--------------------------------------------------------------

Sorry, it seems 9.6.1.7 start support link trigger. refer to https://www-01.ibm.com/support/docview.wss?uid=swg24042304. Current dxl manual is not updated with that content.